package com.ruoyi.system.outto.goods.impl;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.V2.gameAttr.mapper.GameAttributeMapper;
import com.ruoyi.system.V2.goodInfo.mapper.GoodsInfoImgMapper;
import com.ruoyi.system.V2.inter.mapper.ArtRecMapper;
import com.ruoyi.system.model.domain.ArtRec;
import com.ruoyi.system.model.domain.GameAttribute;
import com.ruoyi.system.model.domain.GoodsInfoImg;
import com.ruoyi.system.model.domain.SalePartner;
import com.ruoyi.system.model.dto.GoodsInfoAndAttrValueDto;
import com.ruoyi.system.model.mapper.AccountInfoMapper;
import com.ruoyi.system.outto.core.LCConstant;
import com.ruoyi.system.outto.core.MapUntils;
import com.ruoyi.system.outto.dto.HttpUtil;
import com.ruoyi.system.outto.game.CommonApi;
import com.ruoyi.system.outto.goods.NEWYUDUAPI;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.http.entity.ContentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

/**
 * @author lz
 * @version 1.0
 * @date 2022/6/5 16:19
 */
@Slf4j
@Service
public class NEWYUDUAPIImpl implements NEWYUDUAPI {

    @Resource
    private GoodsInfoImgMapper goodsInfoImgMapper;
    @Resource
    private GameAttributeMapper gameAttributeMapper;
    @Resource
    private ArtRecMapper artRecMapper;
    @Value("${desc.title}")
    private String descTitle;
    @Autowired
    private CommonApi commonApi;
    @Autowired
    private AccountInfoMapper accountInfoMapper;
    static String appid = "zuyoule";
    static String appSecret = "2c9280848a447d7c018a4e63404a015b";
    static SalePartner salePartner;

    //获取token
    public static String getToken() {

        String url = salePartner.getOther()+"/webApi/api_token";
//        String url = "http://back.txhyxds.com/webApi/api_token";
        Map<String, String> params = new TreeMap<>();
        long timestamp = System.currentTimeMillis();
        String cover = timestamp + appid + appSecret;
        String sign = DigestUtils.md5Hex(cover);
        params.put("timestamp", String.valueOf(timestamp));
        params.put("sign", sign);
        Map<String, String> action1 = new TreeMap<>();
        action1.put("appId", appid);
        String response = HttpUtil.doGet(url, action1, params);
        String data = JSONObject.parseObject(response).getString("data");
        String token = JSONObject.parseObject(data).getString("token");
        return token;
    }

    @Override
    public AjaxResult addGame(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, SalePartner salePartner) {
        this.appid = salePartner.getTwoOther();
        this.appSecret = salePartner.getSaleKey();
        this.salePartner = salePartner;
        String token = getToken();
        Map<String, Object> result = new HashMap<>();
        Map<String, Object> params = params(goodsInfoAndAttrValueDto,salePartner);
        Map<String, Object> header = new TreeMap<>();
        header.put("token", token);
        Long time = System.currentTimeMillis();
        header.put("timestamp", String.valueOf(time));
        String cover = MapUntils.getCover(params) + appSecret + token + String.valueOf(time);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        log.info(salePartner.getName()+"新增请求参数={}", JSONObject.toJSONString(params));
        String response = HttpUtil.postRequest(salePartner.getOther()+"/webApi/goods/publish", params, ContentType.APPLICATION_JSON, null, header);
        log.info(salePartner.getName()+"新增返回参数={}", MapUntils.unicodeToString(response));
        JSONObject resultJson = JSONObject.parseObject(response);
        String results = resultJson.getString("result");
        JSONObject resultJsons = JSONObject.parseObject(results);
        if (!"200".equals(resultJsons.getString("code"))) {
            result.put("code", 500);
        } else {
            result.put("code", 200);
            String data = resultJson.getString("data");
            JSONObject resultJsonss = JSONObject.parseObject(data);
            ArtRec artRecreq = new ArtRec();
            artRecreq.setConfig(salePartner.getId());
            artRecreq.setAccountId(goodsInfoAndAttrValueDto.getId());
            List<ArtRec> artRecs = artRecMapper.selectArtRecList(artRecreq);
            if (CollectionUtils.isNotEmpty(artRecs)) {
                artRecs.get(0).setOutid(resultJsonss.getString("goodsId"));
                artRecMapper.updateArtRec(artRecs.get(0));
            } else {
                artRecreq.setAccountId(goodsInfoAndAttrValueDto.getId());
                artRecreq.setCreateId(goodsInfoAndAttrValueDto.getCreateId());
                artRecreq.setType(LCConstant.interAdd);
                artRecreq.setConfig(salePartner.getId());
                artRecreq.setSaleCode(salePartner.getSaleName());
                artRecreq.setOutid(resultJsonss.getString("goodsId"));
                artRecMapper.insertArtRec(artRecreq);
            }
            on(token,resultJsonss.getString("goodsId"));
        }
        result.put("req", JSONObject.toJSONString(params));
        result.put("res", response);
        result.put("msg", response);
        return AjaxResult.success(result);
    }

    @Override
    public AjaxResult editGame(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, SalePartner salePartner) {
        this.appid = salePartner.getTwoOther();
        this.appSecret = salePartner.getSaleKey();
        this.salePartner = salePartner;
        String path = "edit";
        String token = getToken();
        Map<String, Object> result = new HashMap<>();
        Map<String, Object> params = new TreeMap<>();
        ArtRec artRecreq = new ArtRec();
        artRecreq.setConfig(salePartner.getId());
        artRecreq.setAccountId(goodsInfoAndAttrValueDto.getId());
        List<ArtRec> artRecs = artRecMapper.selectArtRecList(artRecreq);
        params.put("goodsId",artRecs.get(0).getOutid());
        BigDecimal bigDecimal = commonApi.addPrice(goodsInfoAndAttrValueDto.getPrice(),  salePartner.getSeleep());
        commonApi.setPrice(bigDecimal,goodsInfoAndAttrValueDto.getId(), salePartner);
        params.put("price",bigDecimal);
        params.put("des",goodsInfoAndAttrValueDto.getDes());
        Map<String, Object> header = new TreeMap<>();
        header.put("token", token);
        System.out.println(header.get("token"));
        Long time = System.currentTimeMillis();
        header.put("timestamp", String.valueOf(time));
        String cover = MapUntils.getCover(params) + appSecret + token + String.valueOf(time);
        System.out.println(cover);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        System.out.println(sign);
        log.info(salePartner.getName()+"编辑接口请求参数={}", JSONObject.toJSONString(params));
        String response = HttpUtil.postRequest(salePartner.getOther()+"/webApi/goods/edit", params, ContentType.APPLICATION_JSON, null, header);
        log.info(salePartner.getName()+"编辑接口返回参数={}", response);
        JSONObject resultJson = JSONObject.parseObject(response);
        String results = resultJson.getString("result");
        JSONObject resultJsons = JSONObject.parseObject(results);
        if (!"200".equals(resultJsons.getString("code"))) {
            result.put("code", 500);
        } else {
            result.put("code", 200);
        }

        result.put("req", JSONObject.toJSONString(params));
        result.put("res", response);
        result.put("msg", resultJson.getString("msg"));
        return AjaxResult.success(result);
    }

    private List<GameAttribute> getGameAttributs(String ids) {
        return gameAttributeMapper.selectGameAttributeListByIds((Long[]) ConvertUtils.convert(ids.split(","),
                Long.class));
    }
    private String reIds(String allIds, String ids) {
        if (StringUtils.isNotEmpty(ids)) {
            if (StringUtils.isNotEmpty(allIds)) {
                allIds = allIds + "," + ids;
            } else {
                allIds = ids;
            }
        }
        return allIds;
    }

    private Map<String, Object> params(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, SalePartner salePartner) {
        Map<String, Object> paramss = new TreeMap<>();
        if (goodsInfoAndAttrValueDto.getGameName().equals("王者荣耀")) {
            wzry(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("和平精英")) {
            hpjy(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("穿越火线")) {
            cyhx(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("枪战王者")) {
            qzwz(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("英雄联盟")) {
            yxlm(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("原神")) {
            ys(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("火影忍者")) {
            hyrz(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("永劫无间")){
            yjwj(goodsInfoAndAttrValueDto, paramss);
        } else if (goodsInfoAndAttrValueDto.getGameName().equals("三国杀")){
            sgs(goodsInfoAndAttrValueDto, paramss);
        }else if (goodsInfoAndAttrValueDto.getGameName().equals("地下城与勇士")){
            dnf(goodsInfoAndAttrValueDto, paramss);
        }else if(goodsInfoAndAttrValueDto.getGameName().equals("崩坏星穹铁道")){
            benghuai(goodsInfoAndAttrValueDto,paramss);
        }
        paramss.put("importantRemark", goodsInfoAndAttrValueDto.getImportantRemark()==null?"无":goodsInfoAndAttrValueDto.getImportantRemark());
        paramss.put("problemDes", goodsInfoAndAttrValueDto.getProblemDes()==null?"无":goodsInfoAndAttrValueDto.getProblemDes());
        String string = "";
        String time = System.currentTimeMillis()+"";
        if("QQ".equals(goodsInfoAndAttrValueDto.getCarrierName())){
            string = time.substring(3,time.length());
        }else{
            string = descTitle+time;
        }
        paramss.put("accountNumber", goodsInfoAndAttrValueDto.getAccountNumber()==null?string:goodsInfoAndAttrValueDto.getAccountNumber());
        paramss.put("accountPassword", goodsInfoAndAttrValueDto.getAccountPassword()==null?123456:goodsInfoAndAttrValueDto.getAccountPassword());
        paramss.put("thirdId",descTitle+"_"+goodsInfoAndAttrValueDto.getId());
        paramss.put("title", goodsInfoAndAttrValueDto.getTitle());
        paramss.put("titleImg", goodsInfoAndAttrValueDto.getTitleImg());
        BigDecimal bigDecimal = commonApi.addPrice(goodsInfoAndAttrValueDto.getPrice(),  salePartner.getSeleep());
        commonApi.setPrice(bigDecimal,goodsInfoAndAttrValueDto.getId(), salePartner);
        paramss.put("price",bigDecimal);
        paramss.put("des", goodsInfoAndAttrValueDto.getDes());
        GoodsInfoImg goodsInfoImg = new GoodsInfoImg();
        goodsInfoImg.setGoodsId(goodsInfoAndAttrValueDto.getId());
        goodsInfoImg.setType(Constants.STR_1);
        List<GoodsInfoImg> infoImgs = goodsInfoImgMapper.selectGoodsInfoImgList(goodsInfoImg);
        String imgUrls = "";
        for(GoodsInfoImg goodsInfoImg1 : infoImgs){
            imgUrls+=","+goodsInfoImg1.getImgUrl();
        }
        if(StringUtils.isNotEmpty(imgUrls)) {
            paramss.put("imgUrls",imgUrls.substring(1));
        }else {
            paramss.put("imgUrls", LCConstant.defaultImg);
        }
        return paramss;
    }
    private Map<String, Object> benghuai(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 24l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(23l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))&&paramss.get("groupId").equals(JSONObject.parseObject(o.toString()).getString("parentId"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }

        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(24l));
        System.out.println(jsonObject1);
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())) {
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF7());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    String string = "";
                    for(GameAttribute gameAttribute1 : gameAttributeList) {
                        for (Object p : jsonArray1) {
                            if (JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())) {
                                string+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(string)){
                        paramss.put("f1",string.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())) {
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF6());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    String string = "";
                    for(GameAttribute gameAttribute1 : gameAttributeList) {
                        for (Object p : jsonArray1) {
                            if (JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())) {
                                string+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(string)){
                        paramss.put("f2",string.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())) {
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF9());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    String string = "";
                    for(GameAttribute gameAttribute1 : gameAttributeList) {
                        for (Object p : jsonArray1) {
                            if (JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())) {
                                string+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(string)){
                        paramss.put("f3",string.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())) {
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF8());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    String string = "";
                    for(GameAttribute gameAttribute1 : gameAttributeList) {
                        for (Object p : jsonArray1) {
                            if (JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())) {
                                string+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(string)){
                        paramss.put("f4",string.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())) {
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF1()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f5",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())) {
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF3()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f6",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f7",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())) {
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF4()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f8",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())) {
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF5());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    String string = "";
                    for(GameAttribute gameAttribute1 : gameAttributeList) {
                        for (Object p : jsonArray1) {
                            if (JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())) {
                                string+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(string)){
                        paramss.put("f9",string.substring(1));
                    }
                }
            }
        }
        return  paramss;
    }

    private Map<String, Object>  dnf(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 23l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(23l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);

        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))&&paramss.get("groupId").equals(JSONObject.parseObject(o.toString()).getString("parentId"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }

        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(23l));
        System.out.println(jsonObject1);
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF1()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f1",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())){
                    List<GameAttribute> gameAttribute1 =gameAttributeMapper.selectGameAttributeListByIds((Long[]) ConvertUtils.convert(goodsInfoAndAttrValueDto.getF2().split(","), Long.class));
                    List<String> collect = gameAttribute1.stream().map(s->s.getFieldName()).collect(Collectors.toList());
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    StringBuilder builder = new StringBuilder("");
                    for (Object p : jsonArray1) {
                        String child = JSONObject.parseObject(p.toString()).getString("child");
                        List<JSONObject> array = JSONObject.parseArray(child, JSONObject.class);
                        if (CollectionUtils.isNotEmpty(array)){
                            for (JSONObject object : array) {
                                if (collect.contains(JSONObject.parseObject(object.toString()).getString("fieldName"))) {
                                    builder.append(JSONObject.parseObject(object.toString()).getString("id") + ",");
                                }
                            }
                        }
                    }
                    paramss.put("f2",builder);

                }
            }

        }
        return  paramss;
    }

    public Map<String, Object> hyrz(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 10l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(10l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        for(Object o : systems){
            if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        for(Object o : carriers){
            if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        if(goodsInfoAndAttrValueDto.getCarrierName().equals("QQ")){
            paramss.put("groupId","42200");
        }else{
            paramss.put("groupId","42205");
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))&&paramss.get("groupId").equals(JSONObject.parseObject(o.toString()).getString("parentId"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(10l));
        System.out.println(jsonObject1);
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())){
                    paramss.put("f1",goodsInfoAndAttrValueDto.getF1());
                }else{
                    paramss.put("f1","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())){
                    paramss.put("f2",goodsInfoAndAttrValueDto.getF2());
                }else{
                    paramss.put("f2","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF3()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f3",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF5());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f5",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF6());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f6",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF7()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f7",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
        }
        return paramss;
    }

    public Map<String, Object> ys(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 4l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(4l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        for(Object o : systems){
            if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        for(Object o : carriers){
            if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(4l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF1()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f1",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f2",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF3()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f3",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF4()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f4",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF5()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f5",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF6()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f6",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    paramss.put("f7",goodsInfoAndAttrValueDto.getF7());
                }else{
                    paramss.put("f7","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())){
                    paramss.put("f8",goodsInfoAndAttrValueDto.getF8());
                }else{
                    paramss.put("f8","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())){
                    paramss.put("f9",goodsInfoAndAttrValueDto.getF9());
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF11());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f11",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f17")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF17())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF17());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f17",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f20")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF20())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF20()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName().replace("游戏已实名","有修改人脸机会/实名是本人").replace("游戏未实名","有修改人脸机会/实名是本人"))){
                            paramss.put("f20",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
        }
        return paramss;
    }

    public Map<String, Object> yxlm(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 5l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(5l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(5l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF1()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f1", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f2", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())) {
                    paramss.put("f3", goodsInfoAndAttrValueDto.getF3());
                }else{
                    paramss.put("f3", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())) {
                    paramss.put("f4", goodsInfoAndAttrValueDto.getF4());
                }else{
                    paramss.put("f4", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())) {
                    paramss.put("f5", goodsInfoAndAttrValueDto.getF5());
                }else{
                    paramss.put("f5", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF6()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f6", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF7());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f7",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF8());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f8",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF9());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f9",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF10())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF10());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f10",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF11());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f11",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f12")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF12())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF12());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f12",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f13")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF13())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF13());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f13",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f14")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF14())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF14());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f14",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f15")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF15())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF15());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f15",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f16")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF16())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF16());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f16",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f17")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF17())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF17());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f17",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f18")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF18())) {
                    paramss.put("f18", goodsInfoAndAttrValueDto.getF18());
                }else{
                    paramss.put("f18", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f19")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF19())) {
                    paramss.put("f19", goodsInfoAndAttrValueDto.getF19());
                }else{
                    paramss.put("f19", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f20")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF20())) {
                    paramss.put("f20", goodsInfoAndAttrValueDto.getF20());
                }else{
                    paramss.put("f20", "0");
                }
            }
        }
        return paramss;
    }

    public Map<String, Object> qzwz(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 8l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(8l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        for(Object o : systems){
            if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        for(Object o : carriers){
            if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        if(goodsInfoAndAttrValueDto.getCarrierName().contains("Q")){
            paramss.put("groupId", "41545");
        }else{
            paramss.put("groupId", "41546");
        }
        if(goodsInfoAndAttrValueDto.getCarrierName().contains("Q")){
            paramss.put("serverId", "41718");
        }else{
            paramss.put("serverId", "41719");
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(8l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())){
                    paramss.put("f1",goodsInfoAndAttrValueDto.getF1());
                }else{
                    paramss.put("f1","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    String value = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(value);
                    for(Object p : jsonArray1){
                        if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                            paramss.put("f2",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                paramss.put("f4","0");
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                paramss.put("f5","0");
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                paramss.put("f6","0");
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF7());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f7",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF8());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f8",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF9()));
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f9",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF10())){
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF10()));
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().replace("可修改实名","有修改人脸机会/实名是本人").replace("包实名认证","无修改人脸机会/实名是本人").equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f10",JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF15())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF15());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f11",name.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f12")) {
                String name = "";
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF12())){
                    String values = JSONObject.parseObject(o.toString()).getString("values");
                    JSONArray jsonArray1 = JSONArray.parseArray(values);
                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF12());
                    for(GameAttribute gameAttribute1 : gameAttributeList){
                        for(Object p : jsonArray1){
                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(name)){
                        paramss.put("f12",name.substring(1));
                    }
                }
            }
//            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f13")) {
//                String name = "";
//                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF13())){
//                    String values = JSONObject.parseObject(o.toString()).getString("values");
//                    JSONArray jsonArray1 = JSONArray.parseArray(values);
//                    List<GameAttribute> gameAttributeList = getGameAttributs(goodsInfoAndAttrValueDto.getF13());
//                    for(GameAttribute gameAttribute1 : gameAttributeList){
//                        for(Object p : jsonArray1){
//                            if(JSONObject.parseObject(p.toString()).getString("fieldName").equals(gameAttribute1.getFieldName())){
//                                name+=","+JSONObject.parseObject(p.toString()).getString("id");
//                            }
//                        }
//                    }
//                    if(StringUtils.isNotEmpty(name)){
//                        paramss.put("f13",name.substring(1));
//                    }
//                }
//            }
        }
        return paramss;
    }

    public Map<String, Object> cyhx(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 6l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(6l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(6l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())) {
                    paramss.put("f1", goodsInfoAndAttrValueDto.getF1());
                }else{
                    paramss.put("f1", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                    paramss.put("f2", goodsInfoAndAttrValueDto.getF2());
                }else{
                    paramss.put("f2", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF3()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f3", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF4()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f4", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF5()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f5", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF6()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f6", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    paramss.put("f7",goodsInfoAndAttrValueDto.getF7());
                }else{
                    paramss.put("f7","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())){
                    paramss.put("f8",goodsInfoAndAttrValueDto.getF8());
                }else{
                    paramss.put("f8","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())){
                    paramss.put("f9",goodsInfoAndAttrValueDto.getF9());
                }else{
                    paramss.put("f9","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF10())){
                    paramss.put("f10",goodsInfoAndAttrValueDto.getF10());
                }else{
                    paramss.put("f10","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())){
                    paramss.put("f11",goodsInfoAndAttrValueDto.getF11());
                }else{
                    paramss.put("f11","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f12")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF12())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF12());
                    String f12 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f12 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f12", f12.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f13")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF13())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF13());
                    String f13 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f13 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f13", f13.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f14")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF14())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF14());
                    String f14 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f14 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f14", f14.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f15")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF15())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF15());
                    String f15 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f15 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f15", f15.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f16")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF16())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF16());
                    String f16 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f16 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f16", f16.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f17")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF17())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF17());
                    String f17 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f17 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f17", f17.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f18")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF18())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF18());
                    String f18 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f18 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f18", f18.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f19")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF19())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF19());
                    String f19 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f19 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f19", f19.substring(1));
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f20")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF20())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF20());
                    String f20 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f20 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    paramss.put("f20", f20.substring(1));
                }
            }

        }

        return paramss;
    }

    public Map<String, Object> hpjy(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 3l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(3l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        for(Object o : systems){
            if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        for(Object o : carriers){
            if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().replace("手","Q").equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            String fidldName = JSONObject.parseObject(o.toString()).getString("fieldName");
            System.out.println(fidldName);
            String string = goodsInfoAndAttrValueDto.getServerName().replace("手","Q");
            System.out.println(string);
            if (string.replace(" ","").equals(fidldName.replace(" ",""))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(3l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray) {
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF1());
                    String f1 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f1 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f1)) {
                        paramss.put("f1", f1.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF2());
                    String f2 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f2 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f2)) {
                        paramss.put("f2", f2.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF3());
                    String f3 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f3 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f3)) {
                        paramss.put("f3", f3.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF4());
                    String f4 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f4 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f4)) {
                        paramss.put("f4", f4.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF5());
                    String f5 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f5 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f5)) {
                        paramss.put("f5", f5.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())){
                    paramss.put("f7",goodsInfoAndAttrValueDto.getF7());
                }else{
                    paramss.put("f7","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())){
                    paramss.put("f8",goodsInfoAndAttrValueDto.getF8());
                }else{
                    paramss.put("f8","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())){
                    paramss.put("f9",goodsInfoAndAttrValueDto.getF9());
                }else{
                    paramss.put("f9","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF10())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF10()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f10", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())){
                    paramss.put("f11",goodsInfoAndAttrValueDto.getF11());
                }else{
                    paramss.put("f11","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f12")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF12())){
                    paramss.put("f12",goodsInfoAndAttrValueDto.getF12());
                }else{
                    paramss.put("f12","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f13")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF13())){
                    paramss.put("f13",goodsInfoAndAttrValueDto.getF13());
                }else{
                    paramss.put("f13","0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f14")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF14())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF14()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f14", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f15")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF15())){
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF15()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f15", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f16")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF16())){
                    paramss.put("f16", goodsInfoAndAttrValueDto.getF16());
                }else{
                    paramss.put("f16", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f17")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF17())){
                    paramss.put("f17", goodsInfoAndAttrValueDto.getF17());
                }else{
                    paramss.put("f17", "0");
                }
            }
        }
        return paramss;
    }

    public Map<String, Object> wzry(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 2l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(2l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        for(Object o : systems){
            if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        for(Object o : carriers){
            if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        for(Object o : groups){
            if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        for(Object o : servers){
            if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                break;
            }
        }
        if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1())) {
            paramss.put("f1", goodsInfoAndAttrValueDto.getF1());
        }

        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(2l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for(Object o : jsonArray){
            if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f2", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())) {
                if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF3()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f3", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4())) {
                    paramss.put("f4", goodsInfoAndAttrValueDto.getF4());
                } else {
                    paramss.put("f4", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF5());
                    String f5 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f5+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f5)) {
                        paramss.put("f5", f5.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())) {
                    paramss.put("f6", goodsInfoAndAttrValueDto.getF6());
                }else{
                    paramss.put("f6", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())) {
                    paramss.put("f7", goodsInfoAndAttrValueDto.getF7());
                }else{
                    paramss.put("f7", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF8())) {
                    paramss.put("f8", goodsInfoAndAttrValueDto.getF8());
                }else{
                    paramss.put("f8", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF9());
                    String f9 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f9+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f9)) {
                        paramss.put("f9", f9.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF10())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF10());
                    String f10 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f10+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f10)) {
                        paramss.put("f10", f10.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF11());
                    String f11 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f11+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f11)) {
                        paramss.put("f11", f11.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f12")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF12())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF12());
                    String f12 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f12+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f12)) {
                        paramss.put("f12", f12.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f13")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF13())) {
                    paramss.put("f13", goodsInfoAndAttrValueDto.getF13());
                }else{
                    paramss.put("f13", "0");
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f15")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF15())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF15());
                    String f15 = "";
                    for(GameAttribute gameAttribute1 : list) {
                        for(Object p:jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f15+=","+JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if(StringUtils.isNotEmpty(f15)) {
                        paramss.put("f15", f15.substring(1));
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f16")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF16())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    GameAttribute gameAttribute1 = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF16()));
                    for(Object p : jsonArray1){
                        if(gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))){
                            paramss.put("f16", JSONObject.parseObject(p.toString()).getString("id"));
                        }
                    }
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f17")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF17())){
                    paramss.put("f17", goodsInfoAndAttrValueDto.getF17());
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f18")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF18())){
                    paramss.put("f18", goodsInfoAndAttrValueDto.getF18());
                }
            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f19")) {
                if(StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF19())){
                    paramss.put("f19", goodsInfoAndAttrValueDto.getF19());
                }else{
                    paramss.put("f19", goodsInfoAndAttrValueDto.getDes());
                }
            }
        }
        return paramss;
    }
    public Map<String, Object> yjwj(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 12l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(12l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        if (systems != null) {
            for (Object o : systems) {
                if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
                }
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        if (carriers != null) {
            for (Object o : carriers) {
                if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        if (groups != null) {
            for (Object o : groups) {
                if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        if (servers != null) {
            for (Object o : servers) {
                if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }
        paramss.put("f1", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1()) ? goodsInfoAndAttrValueDto.getF1() : "女");

        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(12l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        for (Object o : jsonArray) {
            if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2())) {
                if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF2()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f2", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }

            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f3")) {
                paramss.put("f4", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3()) ? goodsInfoAndAttrValueDto.getF3() : "1");

            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f4")) {
                paramss.put("f4", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF4()) ? goodsInfoAndAttrValueDto.getF4() : "无");

            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                paramss.put("f5", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5()) ? goodsInfoAndAttrValueDto.getF5() : "0");

            }
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                paramss.put("f6", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6()) ? goodsInfoAndAttrValueDto.getF6() : "0");

            }

            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())) {
                    GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF7()));
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    for (Object p : jsonArray1) {
                        if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                            paramss.put("f7", JSONObject.parseObject(p.toString()).getString("id"));
                            break;
                        }
                    }
                }
            }
        }
        return paramss;
    }
    public Map<String, Object> sgs(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, Map<String, Object> paramss) {
        paramss.put("gameId", 26l);
        JSONObject jsonObject = JSONObject.parseObject(getGameInfo(26l));
        JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
        String type = data.getString("type");
        paramss.put("gameType", type);
        JSONArray systems = JSONArray.parseArray(data.getString("systems"));
        if (systems != null) {
            for (Object o : systems) {
                if (goodsInfoAndAttrValueDto.getSystemName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("systemId", JSONObject.parseObject(o.toString()).getString("id"));
                }
            }
        }
        JSONArray carriers = JSONArray.parseArray(data.getString("carriers"));
        if (carriers != null) {
            for (Object o : carriers) {
                if (goodsInfoAndAttrValueDto.getCarrierName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("carrierId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }
        JSONArray groups = JSONArray.parseArray(data.getString("groups"));
        if (groups != null) {
            for (Object o : groups) {
                if (goodsInfoAndAttrValueDto.getGroupName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("groupId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }
        JSONArray servers = JSONArray.parseArray(data.getString("servers"));
        if (servers != null) {
            for (Object o : servers) {
                if (goodsInfoAndAttrValueDto.getServerName().equals(JSONObject.parseObject(o.toString()).getString("fieldName"))) {
                    paramss.put("serverId", JSONObject.parseObject(o.toString()).getString("id"));
                    break;
                }
            }
        }


        JSONObject jsonObject1 = JSONObject.parseObject(getGameAttrTemp(26l));
        JSONArray jsonArray = JSONArray.parseArray(jsonObject1.getString("data"));
        List<String> collect = jsonArray.stream().map(s->JSONObject.parseObject(s.toString()).getString("aavName")).collect(Collectors.toList());
        for (Object o : jsonArray) {
            //角色等级
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f1")) {
                paramss.put("f1", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF1()) ? goodsInfoAndAttrValueDto.getF1() : "1");
            }
            //vip等级
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f2")) {
                paramss.put("f2", StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF2()) ? goodsInfoAndAttrValueDto.getF1() : "1");
            }
            //群雄
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f8")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF3())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF8());
                    String f8 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f8 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f8)) {
                        paramss.put("f8", f8.substring(1));
                    }
                }
            }
            //魏国
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f5")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF5())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF5());
                    String f5 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f5 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f5)) {
                        paramss.put("f5", f5.substring(1));
                    }
                }
            }
            //蜀国
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f6")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF6())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF6());
                    String f6 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f6 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f6)) {
                        paramss.put("f6", f6.substring(1));
                    }
                }
            }
            //吴国
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f7")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF7());
                    String f7 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f7 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f7)) {
                        paramss.put("f7", f7.substring(1));
                    }
                }
            }
            //官阶
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f10")) {
                 if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF7())) {
                     GameAttribute gameAttribute = gameAttributeMapper.selectGameAttributeById(Long.valueOf(goodsInfoAndAttrValueDto.getF10()));
                     if (gameAttribute == null) {
                         paramss.put("f10", "0");
                     } else {
                         JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                         for (Object p : jsonArray1) {
                             if (gameAttribute.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                 paramss.put("f10", JSONObject.parseObject(p.toString()).getString("id"));
                                 break;
                             }
                         }
                     }
                 }
            }
            //神将
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f9")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF9())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF9());
                    String f9 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f9 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f9)) {
                        paramss.put("f8", f9.substring(1));
                    }
                }
            }
            //动态皮肤
            if (JSONObject.parseObject(o.toString()).getString("aavName").equals("f11")) {
                if (StringUtils.isNotEmpty(goodsInfoAndAttrValueDto.getF11())) {
                    JSONArray jsonArray1 = JSONArray.parseArray(JSONObject.parseObject(o.toString()).getString("values"));
                    List<GameAttribute> list = getGameAttributs(goodsInfoAndAttrValueDto.getF11());
                    String f11 = "";
                    for (GameAttribute gameAttribute1 : list) {
                        for (Object p : jsonArray1) {
                            if (gameAttribute1.getFieldName().equals(JSONObject.parseObject(p.toString()).getString("fieldName"))) {
                                f11 += "," + JSONObject.parseObject(p.toString()).getString("id");
                            }
                        }
                    }
                    if (StringUtils.isNotEmpty(f11)) {
                        paramss.put("f11", f11.substring(1));
                    }
                }
            }
        }
        return paramss;
    }


    @Override
    public AjaxResult delGame(GoodsInfoAndAttrValueDto goodsInfoAndAttrValueDto, SalePartner sa) {
        this.appid = sa.getTwoOther();
        this.appSecret = sa.getSaleKey();
        this.salePartner = sa;
        String token = getToken();
        Map<String, Object> result = new HashMap<>();
        Map<String, Object> params = new TreeMap<>();
        Map<String, Object> header = new TreeMap<>();
        ArtRec artRecreq = new ArtRec();
        artRecreq.setConfig(sa.getId());
        artRecreq.setAccountId(goodsInfoAndAttrValueDto.getId());
        List<ArtRec> artRecs = artRecMapper.selectArtRecList(artRecreq);
        params.put("goodsId",artRecs.get(0).getOutid());
        header.put("token", token);
        Long time = System.currentTimeMillis();
        header.put("timestamp", String.valueOf(time));
        String cover = MapUntils.getCover(params) + appSecret + token + String.valueOf(time);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        log.info(salePartner.getName()+"删除请求参数={}", params);
        String response = HttpUtil.postRequest(sa.getOther()+"/webApi/goods/off", params, ContentType.APPLICATION_JSON, null, header);
        log.info(salePartner.getName()+"删除接口返回参数={}", response);
        JSONObject resultJson = JSONObject.parseObject(response);
        String results = resultJson.getString("result");
        JSONObject resultJsons = JSONObject.parseObject(results);
        if (!"200".equals(resultJsons.getString("code"))) {
            result.put("code", 500);
        } else {
            result.put("code", 200);
            artRecMapper.deleteArtRecById(artRecs.get(0).getId());
        }
        result.put("req", JSONObject.toJSONString(params));
        result.put("res", response);
        result.put("msg", resultJson);
        return AjaxResult.success(result);
    }

    public static String getCover(Map<String, Object> params) {
        StringBuffer resut = new StringBuffer();
        for (String key : params.keySet()) {
            Object value=params.get(key);
            if (key.equals("urlArr")) {
                Object a = params.get(key);
//                System.out.println(a.toString());
//                System.out.println(a.toString().replaceAll(" ",""));
                value=a.toString().replace("}, ","},");
            }

            resut.append(key + "=" + value + "&");
        }

        return resut.toString();
    }
    public static void main(String[] args) {
        String response =getGameInfo(24l);
        System.out.println(response);

    }

    public static String getCover1(Map<String, String> params) {
        StringBuffer resut = new StringBuffer();
        for (String key : params.keySet()) {
            resut.append(key + "=" + params.get(key) + "&");
        }

        return resut.toString();
    }
    //上架
    public static String on(String token,String goodsId) {
        String url = salePartner.getOther()+"/webApi/goods/on";
        Long time = System.currentTimeMillis();
        Map<String, Object> header = new TreeMap<>();
        header.put("token", token);
        header.put("timestamp", time);
        Map<String, Object> paramss = new TreeMap<>();
        paramss.put("goodsId", goodsId);
        String cover = MapUntils.getCover(paramss) + appSecret + token + String.valueOf(time);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        String response = HttpUtil.postRequest(url, paramss, ContentType.APPLICATION_JSON, null, header);
        return response;
    }

    //获取游戏列表
    public static String getGameList() {
        String url = salePartner.getOther()+"/webApi/gameList";
        long timestamp = System.currentTimeMillis();
        String token = getToken();
        Map<String, String> header = new TreeMap<>();
        Map<String, String> action = new HashMap<>();
//        action.put("gameId", String.valueOf(gameId));
        header.put("token", token);
        header.put("timestamp", String.valueOf(timestamp));
        String cover = getCover1(action) + appSecret + token + timestamp;
        log.info("加密前请求参数={}", cover);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        String response = HttpUtil.doGet(url, action, header);
        return response;
    }

    //获取游戏基本信息
    public static String getGameInfo(Long gameId) {
        String url = salePartner.getOther()+"/webApi/gameInfo/";
//        String url = "http://back.txhyxds.com/webApi/gameInfo/";
        long timestamp = System.currentTimeMillis();
        String token = getToken();
        Map<String, String> header = new TreeMap<>();
        Map<String, String> action = new HashMap<>();
        action.put("gameId", String.valueOf(gameId));
        header.put("token", token);
        header.put("timestamp", String.valueOf(timestamp));
        String cover = getCover1(action) + appSecret + token + timestamp;
        log.info("加密前请求参数={}", cover);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        String response = HttpUtil.doGet(url + String.valueOf(gameId), action, header);
        return response;
    }

    //获取游戏属性
    public static String getGameAttrTemp(Long gameId) {
        String url = salePartner.getOther()+"/webApi/gameAttrTemp/";
//        String url = "http://back.txhyxds.com/webApi/gameAttrTemp/";
        long timestamp = System.currentTimeMillis();
        Map<String, String> header = new TreeMap<>();
        Map<String, String> action = new HashMap<>();
        String token = getToken();
        action.put("gameId", String.valueOf(gameId));
        header.put("token", token);
        header.put("timestamp", String.valueOf(timestamp));
        String cover = getCover1(action) + appSecret + token + timestamp;
        log.info("加密前请求参数={}", cover);
        String sign = DigestUtils.md5Hex(cover);
        header.put("sign", sign);
        System.out.println("sign=====" + sign);
        String response = HttpUtil.doGet(url + String.valueOf(gameId), action, header);
        return response;
    }

}
